//
//  LYQMineSoftCell.m
//  ZCProject
//
//  Created by Zheng on 16/11/14.
//  Copyright © 2016年 Zheng. All rights reserved.
//

#import "LYQMineSoftCell.h"

@implementation LYQMineSoftCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {

        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self.contentView addSubview:self.decorationView];
        [self.contentView addSubview:self.titleLbl];
        
        [self layoutSubviewsInContentView];
    }
    return self;
}

#pragma mark - layout subviews
- (void)layoutSubviewsInContentView {
    
    [_decorationView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(kWScale(4));
        make.height.mas_equalTo(kWScale(14));
        make.left.centerY.equalTo(self);
    }];
    
    [_titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_decorationView.mas_right).offset(kWScale(10));
        make.top.bottom.equalTo(self);
    }];

}

#pragma mark - load subviews
- (UIView *)decorationView {
    if (!_decorationView) {
        _decorationView = [[UIView alloc] init];
        _decorationView.backgroundColor = kLYQBlue;
    }
    return _decorationView;
}

- (UILabel *)titleLbl {
    if (!_titleLbl) {
        _titleLbl = [[UILabel alloc] init];
        _titleLbl.font = kWBFont(17);
        _titleLbl.textColor = kLYQBlack;
        _titleLbl.text = @"我的旅业圈";
    }
    return _titleLbl;
}


@end
